using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Main : MonoBehaviour
{
    public Image Icon;
    
    // Start is called before the first frame update
    void Start()
    {
        LoadBundle();
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void LoadBundle()
    {
        string bundlePath = Application.dataPath + "/../AssetBundle";
        string bundleName = "icon_asset_bundle";

        AssetBundle bundle = AssetBundle.LoadFromFile(bundlePath + "/" + bundleName);
        Sprite sprite = bundle.LoadAsset<Sprite>("Assets/Res/Sprites/icon/icon_hong.png");
        Icon.sprite = sprite;
        Icon.SetNativeSize();
    }
}
